<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <ui:composition>
        <h:head>
            <style type="text/css">
                .col_num{
                    text-align: right;
                }
            </style>
        </h:head>
        <h:body>
            <h:form id="emp">
                <rich:panel styleClass="content-hight">
                    <rich:tabPanel  >
                        <rich:tab  header="查询条件" style="text-align:left;">
                            <h:outputText value="单据日期："/>
                            <h:panelGroup>
                                <rich:calendar value="#{stit.qlb.numDateStart}"
                                               locale="zh_CN"
                                               popup="true"
                                               datePattern="yyyy-MM-dd"
                                               showApplyButton="false"  style="width:200px"/>
                                至
                                <rich:calendar value="#{stit.qlb.numDateEnd}"
                                               locale="zh_CN"
                                               popup="true"
                                               datePattern="yyyy-MM-dd"
                                               showApplyButton="false"  style="width:200px"/>
                            </h:panelGroup>
                            <h:selectManyCheckbox value="#{stit.voutypes}">
                                <f:selectItem itemValue="3" itemLabel="借款单"/>
                                <f:selectItem itemValue="0" itemLabel="报销单"/>
                                <f:selectItem itemValue="1" itemLabel="差旅费报销单"/>
                                <f:selectItem itemValue="4" itemLabel="付款申请单"/>
                                <f:selectItem itemValue="5" itemLabel="支出证明单"/>
                                <f:selectItem itemValue="6" itemLabel="出国差旅报销单"/>
                            </h:selectManyCheckbox>
                        </rich:tab>
                    </rich:tabPanel>

                    <h:commandButton value="查询" action="#{stit.queryForStitTotal}"/>
                    <h:commandButton value="取消" action="#{stit.cancel}"/>
                    <h:commandButton value="导出Excel" action="#{stit.exportExcelTotal}" disabled="#{empty stit.totalByPsn }" />

                    <rich:dataTable value="#{stit.totalByPsn}" var="vtype" style="width: 100%;" rows="10">
                        <h:column>
                            <f:facet name="header">
                                <h:outputText value="单据类型"/>
                            </f:facet>
                            <h:outputText value="借款单"  rendered="#{vtype.voutype == '3'}" style="color:red"/>
                            <h:outputText value="报销单"  rendered="#{vtype.voutype == '0'}" style="color:blue"/>
                            <h:outputText value="差旅费报销单"  rendered="#{vtype.voutype == '1'}" style="color:green"/>
                            <h:outputText value="付款申请单"  rendered="#{vtype.voutype == '4'}" style="color:burlywood"/>
                            <h:outputText value="支出证明单"  rendered="#{vtype.voutype == '5'}" style="color:#445566"/>
                            <h:outputText value="出国差旅报销单"  rendered="#{vtype.voutype == '6'}" style="color:#Ef6f7e"/>
                            <h:outputText value="合计"  rendered="#{vtype.voutype == ''}" style="color:#445566"/>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="单据金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.total}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="扣税金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.taxAmount}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="还款金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.repayment}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="待支付金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.remain}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="核定金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.checkaccount}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <h:column class="col_num">
                            <f:facet name="header">
                                <h:outputText value="支付金额"/>
                            </f:facet>
                            <h:outputText value="#{vtype.payaccount}">
                                <f:convertNumber pattern="#,##0.00"/>
                            </h:outputText>
                        </h:column>
                        <f:facet name="footer"><rich:dataScroller/></f:facet>
                    </rich:dataTable>
                </rich:panel>
            </h:form>
        </h:body>
    </ui:composition>
</html>
